1. Field of the Invention
The present invention relates to a position control apparatus that performs quadrant inversion compensation when the moving direction of an axis of a machine is reversed.
2. Description of the Related Art
First, general quadrant inversion compensation is described below with reference to FIG. 4. FIG. 4 illustrates variations in command position of a Z axis (a1), command speed of a Z-axis motor (b1), friction of the Z axis (c1), inversion compensation applied to the Z axis (d1), output torque of the Z-axis motor (e1), and positional error of the Z-axis motor (f1) in a case where the moving direction of the Z axis of a machine tool is reversed. As illustrated in (b1), when the moving direction of the Z axis is reversed at a reverse point during a machining operation, the sign of the motor command speed is reversed at the reverse point.
At that point, as illustrated in (c1), the friction of the machine changes abruptly at the moment that the sign changes at the reverse point. If, in response to such a change in the friction of the machine, the apparatus performs only the feedback control to control the motor position, i.e., if the apparatus does not perform quadrant inversion compensation, the motor output torque cannot sufficiently deal with the friction change of the machine, as indicated by a line A of (e1). As a result, a large tracking delay occurs, as indicated by a line A of (f1), and the shape of a processed product may be unsatisfactory.
To attempt to deal with this problem, typical position control apparatuses are today able to appropriately perform quadrant inversion compensation to deal with a change in the frictional force that may occur when the moving direction of an axis is reversed. For example, an apparatus may be able perform torque compensation (TFF) defined by a TFF amount and a TFF continuation time illustrated in (d1). Such torque compensation (TFF) enables the motor output torque to respond quickly as indicated by a line B of (e1) and can reduce the tracking delay in a reversing operation as indicated by a line B of (f1). As a result, a product having a satisfactory shape can be obtained.
FIG. 5 is a block diagram illustrating an example of a conventional position control apparatus that can perform quadrant inversion compensation. The position control apparatus illustrated in FIG. 5 includes a numerical value control unit 10, a motor control unit 20, a motor 30, and a detector 40. The motor control unit 20 includes an acceleration/deceleration processing unit 21, a position control unit 22, a speed control unit 23, a quadrant inversion compensation unit 24, and a current control unit 25.
The numerical value control unit 10 can generate a target position command MD based on the content of an input machining (or processing) program. The acceleration/deceleration processing unit 21 generates an internal position command value MP for the motor control unit 20 based on the target position command MD received from the numerical value control unit 10 and a predetermined acceleration/deceleration time. The position control unit 22 generates a speed command value MV based on the position command value MP received from the acceleration/deceleration processing unit 21 and a position detection value received from the detector 40. The position control unit 22 performs position feedback control based on the position detection value received from the detector 40.
The speed control unit 23 generates a torque command value MT based on the speed command value MV received from the position control unit 22 and a differential value of the position detection value received from the detector 40. The speed control unit 23 performs speed feedback control based on the position detection value received from the detector 40. The quadrant inversion compensation unit 24 generates a quadrant inversion compensation TFF if a reversion of the moving direction is detected based on the internal position command value MP sent from the acceleration/deceleration processing unit 21.
The current control unit 25 generates a current command based on the torque command value MT received from the speed control unit 23 and the quadrant inversion compensation TFF received from the quadrant inversion compensation unit 24. Current flows through the motor 30 according to the current command supplied from the current control unit 25, to drive the motor 30. In another embodiment, the quadrant inversion compensation TFF generated by the quadrant inversion compensation unit 24 may serve as a position command compensation amount that can be input to the position control unit 22, or may serve as a speed command compensation amount that can be input to the speed control unit 23.
FIG. 6 illustrates an example shape of a workpiece that may be processed by a machine tool. For example, to process the workpiece illustrated in FIG. 6, a milling tool moves from a start point (located at a lower left position) to an end point (located at an upper left position) along arrows illustrated in the drawing. A dotted line connecting three points A, B, and C indicate reverse positions where the Z axis causes a reversing motion in a manner similar to the operation described with reference to the example illustrated in FIG. 4. The moving amount of the Z axis in a region from the start point to the intermediate point is about 10 mm. The moving amount of the Z axis in a region from the intermediate point to the end point is about 40 mm.
An example of type of position control that can be performed by a conventional apparatus is described below with reference to FIG. 7. FIG. 7 illustrates variations in command position of the Z axis (a2), command speed of the Z-axis motor (b2), friction of the Z axis (c2), inversion compensation applied to the Z axis (d2), output torque of the Z-axis motor (e2), and positional error of the Z-axis motor (f2) in a case where the workpiece illustrated in FIG. 6 is processed. The shape of the workpiece illustrated in FIG. 6 is uniform at the reverse point A, the reverse point B, and the reverse point C. Therefore, the command position of the Z axis (a2) and the command speed of the Z-axis motor (b2) at the reverse point A, the reverse point B, and the reverse point C are similar to each other. On the other hand, the friction of the Z axis (c2) is similar between the reverse point A and the reverse point C as indicated by a line A. However, the friction of the Z axis (c2) at the reverse point B is larger than the frictions at the reverse point A and the reverse point C as indicated by a line B.
In a conventional position control apparatus as described, the inversion compensation amount (d2) is set to be a same value at the reverse point A, the reverse point B, and the reverse point C. Therefore, the output torque of the Z-axis motor at the reverse point B cannot respond sufficiently quickly and may be delayed compared to the friction of the Z axis as indicated by a line B of (e2). The positional error of the Z-axis motor at the reverse point B becomes larger than the errors at the reverse point A and the reverse point B as indicated by a line B of (f2).
It is believed that the above-described problem occurs due to the relative shortness (i.e., approximately 10 mm) of the moving amount of the Z axis in the region from the start point to the intermediate point. For example, in a case where a sliding guide is provided on a Z-axis guide surface, if the Z axis makes reversing motions repetitively in a state where the moving distance of the Z axis is shorter than the pitch of an oil groove, the oil on the guide surface reduces and the friction of the Z axis may increase. Furthermore, if the Z axis makes reversing motions repetitively in a state where the moving distance of the Z axis is shorter than a lead pitch of a ball screw, the ball screw may not roll smoothly and the friction of the Z axis may increase. However, such an increase in the friction does not occur if the Z axis moves a distance sufficiently larger than the above-described oil groove pitch or the lead pitch.
Therefore, both the friction and the positional error increase at the reverse point B. However, if the Z axis passes through the intermediate point and reaches the reverse point C at which the Z-axis moving amount is approximately 40 mm, characteristics of the Z axis at the reverse point C becomes similar to those at the reverse point A.
In an attempt to solve the above-described problem, a conventional method disclosed in the Japanese Patent Application Laid-Open No. 6-73798 includes steps of calculating a friction based on a motor output torque and correcting a value for inversion compensation based on the calculated friction. However, because the output torque generally includes various types of torques, such as a frictional torque, an acceleration/deceleration torque, a cutting torque, a weight holding torque, and others, accurately calculating only the frictional torque based on a load torque can be problematic, or even impossible. Accordingly, the conventional method cannot accurately correct an inversion compensation amount, and the positional error of the Z-axis motor may become even larger than it would have been had no correction been performed.